﻿<%@ Page Language="C#" MasterPageFile="~/Default/MasterPageCorrect.master" AutoEventWireup="true" Inherits="DHAA.Default.Computer" Title="Untitled Page" Codebehind="Computer.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HorizontalMenu" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentCustomeControlsPlaceHolder" Runat="Server">
    <asp:GridView ID="grwComputer" runat="server" AutoGenerateColumns="False" 
        BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
        CellPadding="2" DataSourceID="SqlDataSourceProduct" ForeColor="Black" 
        GridLines="None" ShowHeader="False" Width="100%">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <table align="center" class="style1">
                        <tr>
                            <td align="center">
                                Product Name:<asp:Label ID="lblProductName" runat="server" 
                                    Text='<%# Eval("ProductName") %>'></asp:Label>
                                <br />
                                <asp:Image ID="Image2" runat="server" Height="100px" 
                                    ImageUrl='<%# Eval("ProductImage") %>' Width="100px" />
                                <br />
                                Price:<asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price") %>'></asp:Label>
                                $<br />
                                <br />
                                <asp:HyperLink ID="HyperLink1" runat="server" 
                                    NavigateUrl='<%# "ViewDetails.aspx?ProductID=" + Eval("ProductID") %>'>ViewDetails</asp:HyperLink>
                            </td>
                            <td>
                                <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("Description") %>'></asp:Label>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="Tan" />
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
            HorizontalAlign="Center" />
        <EmptyDataTemplate>
            <asp:Image ID="Image1" runat="server" Height="100px" 
                ImageUrl='<%# Eval("ProductImage") %>' Width="100px" />
        </EmptyDataTemplate>
        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
        <AlternatingRowStyle BackColor="PaleGoldenrod" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSourceProduct" runat="server" 
        ConnectionString="<%$ ConnectionStrings:connectDHAA %>" 
        
        
        
        SelectCommand="SELECT * FROM [Products] WHERE ([CategoryID] = @CategoryID)">
        <SelectParameters>
            <asp:QueryStringParameter Name="CategoryID" QueryStringField="ID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="FooterPlaceHolder" Runat="Server">
</asp:Content>

